/* CONTROVERSY AND COSTS */

*QUALTRICS 2019A DATA

use "Controversy_and_Costs_Replication_Qualtrics2019A.dta" // note:  Stata v.13

**************
*Correlations
**************
	*Costs (time, money, effort) of VID affecting RESPONDENT (Y)
pwcorr vidYTime vidYMoney vidYEffort, sig
alpha vidYTime vidYMoney vidYEffort

	*Costs (time, money, effort) of VID affecting OTHERS (O)
pwcorr vidOTime vidOMoney vidOEffort, sig
alpha vidOTime vidOMoney vidOEffort

*Correlation between additive scales (RESPONDENT and OTHERS)
pwcorr VID_Y_Scale_01 VID_O_Scale_01, sig  // r=.62, p<.001

***************
*Figure 6 (correlations between costs and support for VID)
*Note: Some additional formatting may have been done using Graph Editor
***************

*ALL RESPONDENTS
*Correlations between scales (RESPONDENT and OTHERS, respectively) and support for VID
pwcorr VID_Y_Scale_01 vidSupport, sig  // SELF; r=-.30***
pwcorr VID_O_Scale_01 vidSupport, sig // OTHERS; r=-.43***

*install binscatter*
*install blindschemes package
		*SELF
binscatter vidSupport VID_Y_Scale_01, scheme(plotplain) xtitle("{bf: Perceived Cost: Self}") ///
ytitle("{bf:Support for Government-Issued Photo ID Requirement}")
		*OTHERS
binscatter vidSupport VID_O_Scale_01, scheme(plotplain) xtitle("{bf: Perceived Cost: Others}") ytitle("")

*DEMOCRATS
pwcorr VID_Y_Scale_01 vidSupport if D0R1==0, sig  // SELF; r=-.14**
pwcorr VID_O_Scale_01 vidSupport if D0R1==0, sig // OTHERS; r=-.36***

		*SELF
binscatter vidSupport VID_Y_Scale_01 if D0R1==0, scheme(plotplain) xtitle("{bf: Perceived Cost: Self}") ///
ytitle("{bf:Support for Government-Issued Photo ID Requirement}")
		*OTHERS
binscatter vidSupport VID_O_Scale_01 if D0R1==0, scheme(plotplain) xtitle("{bf: Perceived Cost: Others}") ytitle("")

*REPUBLICANS
pwcorr VID_Y_Scale_01 vidSupport if D0R1==1, sig  // SELF; r=-.37***
pwcorr VID_O_Scale_01 vidSupport if D0R1==1, sig // OTHERS; r=-.38***

		*SELF
binscatter vidSupport VID_Y_Scale_01 if D0R1==1, scheme(plotplain) xtitle("{bf: Perceived Cost: Self}") ///
ytitle("{bf:Support for Government-Issued Photo ID Requirement}")
		*OTHERS
binscatter vidSupport VID_O_Scale_01 if D0R1==1, scheme(plotplain) xtitle("{bf: Perceived Cost: Others}") ytitle("")

*Share of partisans above .8 on each scale
	*Democrats
tab VID_Y_Scale_01 if D0R1==0 // < than 10% of sample is at > .8
tab VID_O_Scale_01 if D0R1==0 // < than 15% at >.8
	*Republicans
tab VID_Y_Scale_01 if D0R1==1 // < 5% of sample is at > .8
tab VID_O_Scale_01 if D0R1==1 // <6% of sample at >.8

*************
*************
